adTempus API
ArcanaDevelopment.adTempus.Client.Collections Namespace / OptionCollection Class / GetOptionValueAsEnum Method / GetOptionValueAsEnum<T>(String,T) Method
The name of the option to get (case-insensitive)


In This Topic
    GetOptionValueAsEnum<T>(String,T) Method
    In This Topic
    Gets the value of the option with the specified name
    Syntax
    'Declaration
     
    
    <CanBeNullAttribute()>
    Public Overloads Function GetOptionValueAsEnum(Of T As {New, Enum, Struct})( _
       ByVal optionName As String, _
       ByVal defaultValue As T _
    ) As T
    [CanBeNull()]
    public T GetOptionValueAsEnum<T>( 
       string optionName,
       T defaultValue
    )
    where T: new(), Enum, struct
    [CanBeNull()]
    public:
    T^ GetOptionValueAsEnumgeneric<typename T>
    ( 
       String^ optionName,
       T^ defaultValue
    ) 
    where T: gcnew(), Enum, value class

    Parameters

    optionName
    The name of the option to get (case-insensitive)
    defaultValue

    Type Parameters

    T

    Return Value

    The OptionValue of the option with the specified name, or defaultValue if the collection does not contain an option with that name or the value cannot be converted to the required type.
    See Also